package usermanager.dao.jdbc;

import java.util.List;

import org.springframework.jdbc.core.simple.ParameterizedBeanPropertyRowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcDaoSupport;

import usermanager.dao.UserDao;
import usermanager.model.User;

public class UserDaoSpringJdbcImpl extends SimpleJdbcDaoSupport implements UserDao {

	public List<User> findAll() {
		String sql = "SELECT * FROM USERS";
		return getSimpleJdbcTemplate().query(sql, ParameterizedBeanPropertyRowMapper.newInstance(User.class));
	}

}
